package com.mycar2w.cloud.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;

/**
 * created time 2017/4/1
 *
 * @author ljc
 * @version V1.0
 */
@Entity
@Table(name = "applie_order", schema = "mycar2wnew", catalog = "")
public class ApplieOrder {
    private Timestamp createTime;
    private Long userId;
    private Double wantPrice;
    private String carDescrip;
    private String carXinghao;
    private Long phone;
    private Long id;
    private Integer isOver;

    @Basic
    @Column(name = "create_time", nullable = false)
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "user_id", nullable = false)
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "want_price", nullable = false, precision = 0)
    public Double getWantPrice() {
        return wantPrice;
    }

    public void setWantPrice(Double wantPrice) {
        this.wantPrice = wantPrice;
    }

    @Basic
    @Column(name = "car_descrip", nullable = false, length = 200)
    public String getCarDescrip() {
        return carDescrip;
    }

    public void setCarDescrip(String carDescrip) {
        this.carDescrip = carDescrip;
    }

    @Basic
    @Column(name = "car_xinghao", nullable = false, length = 50)
    public String getCarXinghao() {
        return carXinghao;
    }

    public void setCarXinghao(String carXinghao) {
        this.carXinghao = carXinghao;
    }

    @Basic
    @Column(name = "phone", nullable = false)
    public Long getPhone() {
        return phone;
    }

    public void setPhone(Long phone) {
        this.phone = phone;
    }

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    @Basic
    @Column(name = "is_over",nullable = true)
    public Integer getIsOver() {
        return isOver;
    }

    public void setIsOver(Integer isOver) {
        this.isOver = isOver;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ApplieOrder that = (ApplieOrder) o;

        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (wantPrice != null ? !wantPrice.equals(that.wantPrice) : that.wantPrice != null) return false;
        if (carDescrip != null ? !carDescrip.equals(that.carDescrip) : that.carDescrip != null) return false;
        if (carXinghao != null ? !carXinghao.equals(that.carXinghao) : that.carXinghao != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = createTime != null ? createTime.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (wantPrice != null ? wantPrice.hashCode() : 0);
        result = 31 * result + (carDescrip != null ? carDescrip.hashCode() : 0);
        result = 31 * result + (carXinghao != null ? carXinghao.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (id != null ? id.hashCode() : 0);
        return result;
    }
}
